home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 April
/
EnigmA AMIGA RUN 06 (1996)(G.R. Edizioni)(IT)[!][issue 1996-04][Skylink CD V].iso
/
progs
/
editor
/
bed
/
rexx
/
selectdoc.bed
< prev
next >
Wrap
Text File
|
1996-03-02
|
780b
|
52 lines
/*
** $VER: SelectDoc.bed 1.0 (02.01.96)
**
** Shows a list of the documents currently loaded in Blacks Editor and
** asks for the number of the document to be activated.
*/
OPTIONS RESULTS
OPTIONS PROMPT "Select document > "
OPTIONS FAILAT 21
PARSE ARG name
ADDRESS BED
IF name = "" THEN DO
GetDocuments
docs = RESULT
SAY "Available documents:"
i=1
DO WHILE docs ~= ""
PARSE VAR docs '"'file'"' file.i docs
IF file = "" THEN file = "Untitled"
SAY ' ' i ':' file
i = i+1
END
IF i=1 THEN DO
SAY "No documents loaded"
RETURN
END
PULL n
IF n = "" THEN RETURN
ADDRESS VALUE file.n
END; ELSE DO
GetPort name
ADDRESS VALUE RESULT
END
IF RC = 0 THEN DO
Screen2Front
IconifyWindow OFF
ActivateWindow FRONT
END; ELSE DO
SAY "Document not found"
END